package com.controller;

import com.controller.vo.OrderItem;
import org.springframework.util.Assert;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OrderController {


    @RequestMapping("order")
    public String order(@RequestBody OrderItem orderItem) {

        Assert.isTrue(orderItem.getName().equals("shirt") && orderItem.getCount().equals(123));

        return "success";
    }
}
